package com.demo.chapter8;

/**重构
 * @author Administrator
 *
 */
public class Reconstruction {
	
	public static void demo(){
		int a = 0;
		Runnable r1 = new Runnable() {
			
			@Override
			public void run() {
				//匿名类可以屏蔽包含类的变量
				int a = 2;
				System.out.println("hello");
			}
		};
		
		Runnable r2 = () -> {
			//int a = 2;
			System.out.println("hello");
		};
	}

}
